import request from '@/utils/request';

//分页查询
export const queryPageApi = (name, degree, clazzId, page, pageSize) =>
  request.get(
    `/students?name=${name}&degree=${degree}&clazzId=${clazzId}&page=${page}&pageSize=${pageSize}`
  );

//新增学员
export const addApi = (student) => request.post('/students', student);

//根据id查询学员信息
export const queryInfoApi = (id) => request.get(`/students/${id}`);

//修改学员信息
export const updateApi = (student) => request.put('/students', student);

//删除学员信息
export const deleteApi = (ids) => request.delete(`/students/${ids}`);

//违纪处理
export const violationApi = (id, score) => request.put(`/students/violation/${id}/${score}`);

